How to define a Record Template
The description of a Record Template is an XML document. The complete structure is:
Note:
Please be aware that there are comments and instructions in the code below. These are included as: <!-- Comment / Instruction -->
and may require that you add / repeat code.
<template maxrecord="number" setIRN="yes|no">
<tuple>
<atom name="colname"> <!-- Atomic value: add atomic values as required -->
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
<input type="text|integer|float" cols="number" rows="number" increment="number" mandatory="yes|no">
<prompt>
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</prompt>
<help>
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</help>
<value>
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</value>
</input>
<records/>
<number/>
</atom>
<table name="colname"> <!-- Nested or double nested table - add tables as required -->
<tuple> <!-- nested table - repeatable -->
<atom>
<!-- Add code as for atom above -->
</atom>
</tuple>
<tuple> <!-- Double nested table - add as required-->
<table>
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
<tuple> <!-- Nested table - add as required-->
<atom>
<!-- Add code as for atom above -->
</atom>
</tuple>
</table>
</tuple>
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</table>
</tuple>
<report>
text
<column name="colname"/>
</report>/>
</template>
Although the XML may look complex, the main part is the specification of the fields that require values to be set. The format of the XML for this part is exactly the same as that generated by the
A quick summary of the XML structure used by the three kinds of fields in
An atomic field contains a single value. It is represented by a single data entry area in the
<atom name="colname">value</atom>
where:
colname | is the name of the field |
value | is the contents of the field |
A nested table field contains a list of values. A grid is used to display the list in the
<table name="colname"> <tuple> <atom>value 1</atom> </tuple> <tuple> <atom>value 2</atom> </tuple> ... </table>
where:
colname | is the name of the field. |
value 1, value 2 etc. | are the values in the list. |
There is no limit to the number of <tuple>
entries in a nested table.
A double nested table field consists of a list where each entry is itself a list. The
<table name="colname">
<tuple>
<table>
<tuple>
<atom>value 1-1</atom>
</tuple>
<tuple>
<atom>value 1-2</atom>
</tuple>
...
</table>
</tuple>
<tuple>
<table>
<tuple>
<atom>value 2-1</atom>
</tuple>
...
</table>
</tuple>
...
</table>
where:
colname | is the name of the field. |
value 1-1, value 1-2 etc. | are the list of values in the first list |
value 2-1, value 2-2 etc. | are the list of values in the second list and so on. |
There is no limit to the number of values in any of the lists.